#!/bin/sh
#
# stop-all -- stop all docker labs
#

id_names=`docker ps -a --format='{{.ID}},{{.Names}}' | sed '1!G;h;$!d'`

for id_name in $id_names
do
    id=$(echo $id_name | cut -d ',' -f1)
    name=$(echo $id_name | cut -d ',' -f2)

    echo "Stopping $name ..."
    docker stop $id 2>&1
done
